{smcl}
{txt}{sf}{ul off}{.-}
      name:  {res}<unnamed>
       {txt}log:  {res}/Users/Allan/Dropbox/!!Papers/Liberal Peace/Nina Gartzke paper/2013-20/ReplicationFiles/Output/log_observing_do.smcl
  {txt}log type:  {res}smcl
 {txt}opened on:  {res}10 Feb 2014, 10:33:09

{com}. 
. set mem 1g
{txt}{bf:set memory} ignored.
{p 4 4 2}
Memory no longer
needs to be set in modern Statas;
memory adjustments are performed on the fly
automatically.
{p_end}

{com}. use "Original Files/capitalistpeace_012007.dta"
{txt}(all dyads 1950-92: 12-18-98)

{com}. gen orig=1

. **This datafile was downloaded from Erik Gartzke's website: http://dss.ucsd.edu/~egartzke/data/capitalistpeace_012007.dta

. 
. sort statea stateb year

. 
. merge statea stateb year using "Original Files/COW MID.dta"
{txt}{p}
(note: you are using old
{bf:merge} syntax; see
{bf:{help merge:[D] merge}} for new syntax)
{p_end}
{p 0 4 2}
variable{txt}s{txt} statea
stateb
year
do not uniquely identify observations in
Original Files/COW MID.dta
{p_end}

{com}. 
. rename _merge merge1
{res}
{com}. 
. 
. kountry statea, from(cown) to(cowc)

{txt}{hline 44}
You are converting from {com}cown{txt} to {com}cowc{txt}....
{hline 44}

{hline 38}
The command has finished.
The new variable is named {com}_COWC_{txt}.
{hline 38}

{com}. rename _COWC_ stateabb_a
{res}
{com}. 
. kountry statea, from(cown) 

{txt}{hline 40}
The command has finished.
The new variable is named {com}NAMES_STD{txt}.
{hline 40}

{com}. rename NAMES_STD statename_a
{res}
{com}. 
. kountry stateb, from(cown) to (cowc)

{txt}{hline 44}
You are converting from {com}cown{txt} to {com}cowc{txt}....
{hline 44}

{hline 38}
The command has finished.
The new variable is named {com}_COWC_{txt}.
{hline 38}

{com}. rename _COWC_ stateabb_b
{res}
{com}. 
. kountry stateb, from(cown) 

{txt}{hline 40}
The command has finished.
The new variable is named {com}NAMES_STD{txt}.
{hline 40}

{com}. rename NAMES_STD statename_b
{res}
{com}. 
. sort stateabb_a stateabb_b year

. 
. *From Weeks and Cohen's "Red Herrings" paper

. merge stateabb_a stateabb_b year using "Original Files/fishingdisputes.dta"
{txt}{p}
(note: you are using old
{bf:merge} syntax; see
{bf:{help merge:[D] merge}} for new syntax)
{p_end}
{p 0 4 2}
variable{txt}s{txt} stateabb_a
stateabb_b
year
do not uniquely identify observations in
the master data
{p_end}
{p 0 4 2}
variable{txt}s{txt} stateabb_a
stateabb_b
year
do not uniquely identify observations in
Original Files/fishingdisputes.dta
{p_end}

{com}. 
. 
. *Correcting dataset by shifting Gartzke's capopenl and capopenh one year forward.

. sort dyadid year

. by dyadid: gen capopenl2=capopenl[_n-1]
{txt}(162423 missing values generated)

{com}. 
. 
. 
. gen fatalmax=max(cwfatal1, cwfatal2) if cwfatal1~=. & cwfatal2~=.
{txt}(385607 missing values generated)

{com}. 
. *Datasets combined, now analyze

. *excluded fishing disputes and non bilateral disputes

. **FATAL MIDS, High Capopenl

. 
. order stateabb_a stateabb_b year capopenl capopenl2 capopenh fdecision cwfatald fatalmax cwfatal1 cwfatal2 cwhiact1 cwhiact2 cwnumst1 cwnumst2

. gsort   -capopenl2 -cwfatald

. 
. 
. tab capopenl2 maoznewl, ro
{txt}
{c TLC}{hline 16}{c TRC}
{c |} Key{col 18}{c |}
{c LT}{hline 16}{c RT}
{c |}{space 3}{it:frequency}{col 18}{c |}
{c |}{space 1}{it:row percentage}{col 18}{c |}
{c BLC}{hline 16}{c BRC}

           {c |}    MID - lead Maoz
           {c |}     dyadic onset
 capopenl2 {c |}         0          1 {c |}     Total
{hline 11}{c +}{hline 22}{c +}{hline 10}
         0 {c |}{res}    12,627         96 {txt}{c |}{res}    12,723 
           {txt}{c |}{res}     99.25       0.75 {txt}{c |}{res}    100.00 
{txt}{hline 11}{c +}{hline 22}{c +}{hline 10}
         1 {c |}{res}    29,523        158 {txt}{c |}{res}    29,681 
           {txt}{c |}{res}     99.47       0.53 {txt}{c |}{res}    100.00 
{txt}{hline 11}{c +}{hline 22}{c +}{hline 10}
         2 {c |}{res}    47,284        125 {txt}{c |}{res}    47,409 
           {txt}{c |}{res}     99.74       0.26 {txt}{c |}{res}    100.00 
{txt}{hline 11}{c +}{hline 22}{c +}{hline 10}
         3 {c |}{res}    56,677        193 {txt}{c |}{res}    56,870 
           {txt}{c |}{res}     99.66       0.34 {txt}{c |}{res}    100.00 
{txt}{hline 11}{c +}{hline 22}{c +}{hline 10}
         4 {c |}{res}    44,443        103 {txt}{c |}{res}    44,546 
           {txt}{c |}{res}     99.77       0.23 {txt}{c |}{res}    100.00 
{txt}{hline 11}{c +}{hline 22}{c +}{hline 10}
         5 {c |}{res}    20,201         21 {txt}{c |}{res}    20,222 
           {txt}{c |}{res}     99.90       0.10 {txt}{c |}{res}    100.00 
{txt}{hline 11}{c +}{hline 22}{c +}{hline 10}
         6 {c |}{res}     9,008         12 {txt}{c |}{res}     9,020 
           {txt}{c |}{res}     99.87       0.13 {txt}{c |}{res}    100.00 
{txt}{hline 11}{c +}{hline 22}{c +}{hline 10}
         7 {c |}{res}     3,283          3 {txt}{c |}{res}     3,286 
           {txt}{c |}{res}     99.91       0.09 {txt}{c |}{res}    100.00 
{txt}{hline 11}{c +}{hline 22}{c +}{hline 10}
         8 {c |}{res}     2,220         10 {txt}{c |}{res}     2,230 
           {txt}{c |}{res}     99.55       0.45 {txt}{c |}{res}    100.00 
{txt}{hline 11}{c +}{hline 22}{c +}{hline 10}
     Total {c |}{res}   225,266        721 {txt}{c |}{res}   225,987 
           {txt}{c |}{res}     99.68       0.32 {txt}{c |}{res}    100.00 


{com}. tab capopenl2 deadlyl, ro
{txt}
{c TLC}{hline 16}{c TRC}
{c |} Key{col 18}{c |}
{c LT}{hline 16}{c RT}
{c |}{space 3}{it:frequency}{col 18}{c |}
{c |}{space 1}{it:row percentage}{col 18}{c |}
{c BLC}{hline 16}{c BRC}

           {c |}    MID - lead Maoz
           {c |}      deadly MID
 capopenl2 {c |}         0          1 {c |}     Total
{hline 11}{c +}{hline 22}{c +}{hline 10}
         0 {c |}{res}    12,712         11 {txt}{c |}{res}    12,723 
           {txt}{c |}{res}     99.91       0.09 {txt}{c |}{res}    100.00 
{txt}{hline 11}{c +}{hline 22}{c +}{hline 10}
         1 {c |}{res}    29,638         43 {txt}{c |}{res}    29,681 
           {txt}{c |}{res}     99.86       0.14 {txt}{c |}{res}    100.00 
{txt}{hline 11}{c +}{hline 22}{c +}{hline 10}
         2 {c |}{res}    47,392         17 {txt}{c |}{res}    47,409 
           {txt}{c |}{res}     99.96       0.04 {txt}{c |}{res}    100.00 
{txt}{hline 11}{c +}{hline 22}{c +}{hline 10}
         3 {c |}{res}    56,810         60 {txt}{c |}{res}    56,870 
           {txt}{c |}{res}     99.89       0.11 {txt}{c |}{res}    100.00 
{txt}{hline 11}{c +}{hline 22}{c +}{hline 10}
         4 {c |}{res}    44,528         18 {txt}{c |}{res}    44,546 
           {txt}{c |}{res}     99.96       0.04 {txt}{c |}{res}    100.00 
{txt}{hline 11}{c +}{hline 22}{c +}{hline 10}
         5 {c |}{res}    20,222          0 {txt}{c |}{res}    20,222 
           {txt}{c |}{res}    100.00       0.00 {txt}{c |}{res}    100.00 
{txt}{hline 11}{c +}{hline 22}{c +}{hline 10}
         6 {c |}{res}     9,017          3 {txt}{c |}{res}     9,020 
           {txt}{c |}{res}     99.97       0.03 {txt}{c |}{res}    100.00 
{txt}{hline 11}{c +}{hline 22}{c +}{hline 10}
         7 {c |}{res}     3,286          0 {txt}{c |}{res}     3,286 
           {txt}{c |}{res}    100.00       0.00 {txt}{c |}{res}    100.00 
{txt}{hline 11}{c +}{hline 22}{c +}{hline 10}
         8 {c |}{res}     2,230          0 {txt}{c |}{res}     2,230 
           {txt}{c |}{res}    100.00       0.00 {txt}{c |}{res}    100.00 
{txt}{hline 11}{c +}{hline 22}{c +}{hline 10}
     Total {c |}{res}   225,835        152 {txt}{c |}{res}   225,987 
           {txt}{c |}{res}     99.93       0.07 {txt}{c |}{res}    100.00 


{com}. 
. **fix drop definition so it is precise

. gen drop=0

. bysort dyadid: replace drop=1 if fdecision[_n-1]=="Drop" | fdecision[_n]=="Drop" | fdecision[_n+1]=="Drop"
{txt}(251 real changes made)

{com}. 
. 
. save "Output/temp", replace
{txt}(note: file Output/temp.dta not found)
file Output/temp.dta saved

{com}. 
. 
. 
. **Creating Figure 1**

. **Using a 3 order polynomial because it is smoother

. *To implement 3 order polynomial, estimate model, extract SEs, then calculate CI. 

. 
. gen capopenlp2=capopenl^2
{txt}(147795 missing values generated)

{com}. gen capopenlp3=capopenl^3
{txt}(147795 missing values generated)

{com}. 
. 
. 
. logit maoznewl  capopenl capopenlp2 capopenlp3 demlo demhi deplo rgdppclo gdpcontg sun2cati contig logdstab majpdyds allies lncaprt namerica samerica europe africa nafmeast asia if drop==0, cluster(dyadid) 

{res}{txt}Iteration 0:{space 3}log pseudolikelihood = {res:-3792.2623}  
Iteration 1:{space 3}log pseudolikelihood = {res:  -2651.87}  
Iteration 2:{space 3}log pseudolikelihood = {res:-2333.8704}  
Iteration 3:{space 3}log pseudolikelihood = {res:-2266.3137}  
Iteration 4:{space 3}log pseudolikelihood = {res:-2265.4026}  
Iteration 5:{space 3}log pseudolikelihood = {res:-2265.4017}  
Iteration 6:{space 3}log pseudolikelihood = {res:-2265.4017}  
{res}
{txt}Logistic regression{col 51}Number of obs{col 67}= {res}    166101
{txt}{col 51}Wald chi2({res}20{txt}){col 67}= {res}   1440.00
{txt}{col 51}Prob > chi2{col 67}= {res}    0.0000
{txt}Log pseudolikelihood = {res}-2265.4017{txt}{col 51}Pseudo R2{col 67}= {res}    0.4026

{txt}{ralign 78:(Std. Err. adjusted for {res:9875} clusters in dyadid)}
{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 14}{c |}{col 26}    Robust
{col 1}    maoznewl{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      z{col 46}   P>|z|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 4}capopenl {c |}{col 14}{res}{space 2}-.1625947{col 26}{space 2} .2769401{col 37}{space 1}   -0.59{col 46}{space 3}0.557{col 54}{space 4}-.7053873{col 67}{space 3}  .380198
{txt}{space 2}capopenlp2 {c |}{col 14}{res}{space 2} .0100178{col 26}{space 2} .0952232{col 37}{space 1}    0.11{col 46}{space 3}0.916{col 54}{space 4}-.1766162{col 67}{space 3} .1966518
{txt}{space 2}capopenlp3 {c |}{col 14}{res}{space 2}-.0030026{col 26}{space 2} .0091485{col 37}{space 1}   -0.33{col 46}{space 3}0.743{col 54}{space 4}-.0209333{col 67}{space 3} .0149281
{txt}{space 7}demlo {c |}{col 14}{res}{space 2}-.0054154{col 26}{space 2} .0150083{col 37}{space 1}   -0.36{col 46}{space 3}0.718{col 54}{space 4}-.0348312{col 67}{space 3} .0240004
{txt}{space 7}demhi {c |}{col 14}{res}{space 2}-.0138092{col 26}{space 2} .0146719{col 37}{space 1}   -0.94{col 46}{space 3}0.347{col 54}{space 4}-.0425656{col 67}{space 3} .0149472
{txt}{space 7}deplo {c |}{col 14}{res}{space 2}-9.924136{col 26}{space 2} 9.622189{col 37}{space 1}   -1.03{col 46}{space 3}0.302{col 54}{space 4}-28.78328{col 67}{space 3} 8.935008
{txt}{space 4}rgdppclo {c |}{col 14}{res}{space 2}  .000211{col 26}{space 2} .0000378{col 37}{space 1}    5.59{col 46}{space 3}0.000{col 54}{space 4}  .000137{col 67}{space 3} .0002851
{txt}{space 4}gdpcontg {c |}{col 14}{res}{space 2}-.0002809{col 26}{space 2} .0000771{col 37}{space 1}   -3.64{col 46}{space 3}0.000{col 54}{space 4} -.000432{col 67}{space 3}-.0001299
{txt}{space 4}sun2cati {c |}{col 14}{res}{space 2}-1.289668{col 26}{space 2}  .250031{col 37}{space 1}   -5.16{col 46}{space 3}0.000{col 54}{space 4} -1.77972{col 67}{space 3}-.7996162
{txt}{space 6}contig {c |}{col 14}{res}{space 2} 3.848225{col 26}{space 2} .3510677{col 37}{space 1}   10.96{col 46}{space 3}0.000{col 54}{space 4} 3.160145{col 67}{space 3} 4.536306
{txt}{space 4}logdstab {c |}{col 14}{res}{space 2}-.5729285{col 26}{space 2} .1020419{col 37}{space 1}   -5.61{col 46}{space 3}0.000{col 54}{space 4}-.7729271{col 67}{space 3}  -.37293
{txt}{space 4}majpdyds {c |}{col 14}{res}{space 2} 1.199286{col 26}{space 2}    .3544{col 37}{space 1}    3.38{col 46}{space 3}0.001{col 54}{space 4} .5046744{col 67}{space 3} 1.893897
{txt}{space 5}alliesr {c |}{col 14}{res}{space 2}-.2240508{col 26}{space 2} .3485488{col 37}{space 1}   -0.64{col 46}{space 3}0.520{col 54}{space 4}-.9071939{col 67}{space 3} .4590923
{txt}{space 5}lncaprt {c |}{col 14}{res}{space 2}-.1425561{col 26}{space 2} .0716074{col 37}{space 1}   -1.99{col 46}{space 3}0.047{col 54}{space 4}-.2829041{col 67}{space 3}-.0022081
{txt}{space 4}namerica {c |}{col 14}{res}{space 2} .6506038{col 26}{space 2} .5825745{col 37}{space 1}    1.12{col 46}{space 3}0.264{col 54}{space 4}-.4912212{col 67}{space 3} 1.792429
{txt}{space 4}samerica {c |}{col 14}{res}{space 2} 1.015483{col 26}{space 2} .5885559{col 37}{space 1}    1.73{col 46}{space 3}0.084{col 54}{space 4}-.1380654{col 67}{space 3} 2.169031
{txt}{space 6}europe {c |}{col 14}{res}{space 2}-.9937418{col 26}{space 2} .5165734{col 37}{space 1}   -1.92{col 46}{space 3}0.054{col 54}{space 4}-2.006207{col 67}{space 3} .0187235
{txt}{space 6}africa {c |}{col 14}{res}{space 2} .1847863{col 26}{space 2} .4688185{col 37}{space 1}    0.39{col 46}{space 3}0.693{col 54}{space 4}-.7340811{col 67}{space 3} 1.103654
{txt}{space 4}nafmeast {c |}{col 14}{res}{space 2} 1.457345{col 26}{space 2} .3569695{col 37}{space 1}    4.08{col 46}{space 3}0.000{col 54}{space 4} .7576972{col 67}{space 3} 2.156992
{txt}{space 8}asia {c |}{col 14}{res}{space 2} 1.484355{col 26}{space 2} .4259341{col 37}{space 1}    3.48{col 46}{space 3}0.000{col 54}{space 4} .6495396{col 67}{space 3} 2.319171
{txt}{space 7}_cons {c |}{col 14}{res}{space 2}-1.562069{col 26}{space 2} .9515907{col 37}{space 1}   -1.64{col 46}{space 3}0.101{col 54}{space 4}-3.427152{col 67}{space 3} .3030145
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}. 
. matrix b=e(b)

. matrix V=e(V)

. 
. 
. *marginal effect is:

. gen capB5=_b[capopenl]*capopenl+(_b[capopenlp2])*capopenl^2+(_b[capopenlp3])*capopenl^3
{txt}(147795 missing values generated)

{com}. 
. gen capse5=sqrt(V[1,1]+(2*capopenl)^2*V[2,2]+9*capopenl^4*V[3,3]+4*capopenl*V[1,2]+6*capopenl^2*V[1,3]+12*capopenl^3*V[2,3])
{txt}(147795 missing values generated)

{com}. 
. *gen conse=sqrt(V[1,1]+(2*MV)^2 * V[2,2] + (3*MV^2)^2 * V[3,3] + 2 * ( 2 * MV * V[1,2] + 3*MV^2 *V[1,3] + 2*MV*3*MV^2 * V[2,3])) 

. 
. 
. logit deadlyl  capopenl capopenlp2 capopenlp3 demlo demhi deplo rgdppclo gdpcontg sun2cati contig logdstab majpdyds allies lncaprt namerica samerica europe africa nafmeast asia if drop==0, cluster(dyadid) 

{res}{txt}Iteration 0:{space 3}log pseudolikelihood = {res:-1066.9635}  
Iteration 1:{space 3}log pseudolikelihood = {res:-789.62337}  
Iteration 2:{space 3}log pseudolikelihood = {res:-722.63527}  
Iteration 3:{space 3}log pseudolikelihood = {res:-710.69666}  
Iteration 4:{space 3}log pseudolikelihood = {res:-710.48776}  
Iteration 5:{space 3}log pseudolikelihood = {res:-710.48621}  
Iteration 6:{space 3}log pseudolikelihood = {res:-710.48621}  
{res}
{txt}Logistic regression{col 51}Number of obs{col 67}= {res}    166101
{txt}{col 51}Wald chi2({res}20{txt}){col 67}= {res}   1141.52
{txt}{col 51}Prob > chi2{col 67}= {res}    0.0000
{txt}Log pseudolikelihood = {res}-710.48621{txt}{col 51}Pseudo R2{col 67}= {res}    0.3341

{txt}{ralign 78:(Std. Err. adjusted for {res:9875} clusters in dyadid)}
{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 14}{c |}{col 26}    Robust
{col 1}     deadlyl{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      z{col 46}   P>|z|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 4}capopenl {c |}{col 14}{res}{space 2} .0978829{col 26}{space 2} .3108383{col 37}{space 1}    0.31{col 46}{space 3}0.753{col 54}{space 4} -.511349{col 67}{space 3} .7071148
{txt}{space 2}capopenlp2 {c |}{col 14}{res}{space 2}-.0064169{col 26}{space 2}  .121663{col 37}{space 1}   -0.05{col 46}{space 3}0.958{col 54}{space 4} -.244872{col 67}{space 3} .2320382
{txt}{space 2}capopenlp3 {c |}{col 14}{res}{space 2}-.0075239{col 26}{space 2}  .012964{col 37}{space 1}   -0.58{col 46}{space 3}0.562{col 54}{space 4}-.0329327{col 67}{space 3}  .017885
{txt}{space 7}demlo {c |}{col 14}{res}{space 2}-.0264143{col 26}{space 2} .0276236{col 37}{space 1}   -0.96{col 46}{space 3}0.339{col 54}{space 4}-.0805557{col 67}{space 3}  .027727
{txt}{space 7}demhi {c |}{col 14}{res}{space 2} .0215757{col 26}{space 2} .0260018{col 37}{space 1}    0.83{col 46}{space 3}0.407{col 54}{space 4} -.029387{col 67}{space 3} .0725383
{txt}{space 7}deplo {c |}{col 14}{res}{space 2}-106.0646{col 26}{space 2} 87.82938{col 37}{space 1}   -1.21{col 46}{space 3}0.227{col 54}{space 4} -278.207{col 67}{space 3} 66.07785
{txt}{space 4}rgdppclo {c |}{col 14}{res}{space 2} .0002174{col 26}{space 2}  .000058{col 37}{space 1}    3.75{col 46}{space 3}0.000{col 54}{space 4} .0001038{col 67}{space 3}  .000331
{txt}{space 4}gdpcontg {c |}{col 14}{res}{space 2}-.0002559{col 26}{space 2}  .000106{col 37}{space 1}   -2.41{col 46}{space 3}0.016{col 54}{space 4}-.0004637{col 67}{space 3}-.0000482
{txt}{space 4}sun2cati {c |}{col 14}{res}{space 2}-.6220802{col 26}{space 2} .3941335{col 37}{space 1}   -1.58{col 46}{space 3}0.114{col 54}{space 4}-1.394568{col 67}{space 3} .1504073
{txt}{space 6}contig {c |}{col 14}{res}{space 2} 3.500322{col 26}{space 2} .4173938{col 37}{space 1}    8.39{col 46}{space 3}0.000{col 54}{space 4} 2.682245{col 67}{space 3} 4.318398
{txt}{space 4}logdstab {c |}{col 14}{res}{space 2}-.5052577{col 26}{space 2}  .121008{col 37}{space 1}   -4.18{col 46}{space 3}0.000{col 54}{space 4}-.7424289{col 67}{space 3}-.2680865
{txt}{space 4}majpdyds {c |}{col 14}{res}{space 2} .9865046{col 26}{space 2} .5163114{col 37}{space 1}    1.91{col 46}{space 3}0.056{col 54}{space 4}-.0254471{col 67}{space 3} 1.998456
{txt}{space 5}alliesr {c |}{col 14}{res}{space 2} .1047863{col 26}{space 2}  .650972{col 37}{space 1}    0.16{col 46}{space 3}0.872{col 54}{space 4}-1.171095{col 67}{space 3} 1.380668
{txt}{space 5}lncaprt {c |}{col 14}{res}{space 2}-.2020584{col 26}{space 2} .0906453{col 37}{space 1}   -2.23{col 46}{space 3}0.026{col 54}{space 4}  -.37972{col 67}{space 3}-.0243969
{txt}{space 4}namerica {c |}{col 14}{res}{space 2} .6236928{col 26}{space 2} .6987915{col 37}{space 1}    0.89{col 46}{space 3}0.372{col 54}{space 4}-.7459133{col 67}{space 3} 1.993299
{txt}{space 4}samerica {c |}{col 14}{res}{space 2} .0452626{col 26}{space 2}  1.10734{col 37}{space 1}    0.04{col 46}{space 3}0.967{col 54}{space 4}-2.125084{col 67}{space 3} 2.215609
{txt}{space 6}europe {c |}{col 14}{res}{space 2}-1.586406{col 26}{space 2} 1.085402{col 37}{space 1}   -1.46{col 46}{space 3}0.144{col 54}{space 4}-3.713755{col 67}{space 3} .5409425
{txt}{space 6}africa {c |}{col 14}{res}{space 2} .5682305{col 26}{space 2}   .62536{col 37}{space 1}    0.91{col 46}{space 3}0.364{col 54}{space 4}-.6574526{col 67}{space 3} 1.793914
{txt}{space 4}nafmeast {c |}{col 14}{res}{space 2} 1.744865{col 26}{space 2} .4304807{col 37}{space 1}    4.05{col 46}{space 3}0.000{col 54}{space 4} .9011382{col 67}{space 3} 2.588591
{txt}{space 8}asia {c |}{col 14}{res}{space 2}  1.98774{col 26}{space 2} .5787405{col 37}{space 1}    3.43{col 46}{space 3}0.001{col 54}{space 4} .8534298{col 67}{space 3} 3.122051
{txt}{space 7}_cons {c |}{col 14}{res}{space 2}-4.485901{col 26}{space 2} 1.165369{col 37}{space 1}   -3.85{col 46}{space 3}0.000{col 54}{space 4}-6.769982{col 67}{space 3}-2.201821
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{p 0 6 2}Note: 23 failures and 0 successes completely determined.{p_end}

{com}. 
. matrix b2=e(b)

. matrix V2=e(V)

. 
. 
. *marginal effect is:

. gen capB9=_b[capopenl]*capopenl+(_b[capopenlp2])*capopenl^2+(_b[capopenlp3])*capopenl^3
{txt}(147795 missing values generated)

{com}. 
. gen capse9=sqrt(V2[1,1]+(2*capopenl)^2*V2[2,2]+9*capopenl^4*V2[3,3]+4*capopenl*V2[1,2]+6*capopenl^2*V2[1,3]+12*capopenl^3*V2[2,3])
{txt}(147795 missing values generated)

{com}. 
. 
. *bysort capopenl: egen mpr5c = mean(pr5c)

. bysort capopenl: egen mprop5 = mean(maoznewl) if drop==0
{txt}(251 missing values generated)

{com}. tab mprop5 capopenl 

           {txt}{c |}                           IMF - govt financial openness, low
    mprop5 {c |}         0          1          2          3          4          5          6          7 {c |}     Total
{hline 11}{c +}{hline 88}{c +}{hline 10}
  .0005604 {c |}{res}         0          0          0          0          0          0          0      3,569 {txt}{c |}{res}     3,569 
{txt}  .0009114 {c |}{res}         0          0          0          0          0     21,945          0          0 {txt}{c |}{res}    21,945 
{txt}  .0012353 {c |}{res}         0          0          0          0          0          0     10,524          0 {txt}{c |}{res}    10,524 
{txt}  .0022481 {c |}{res}         0          0          0          0     48,041          0          0          0 {txt}{c |}{res}    48,041 
{txt}  .0026326 {c |}{res}         0          0     49,001          0          0          0          0          0 {txt}{c |}{res}    49,001 
{txt}  .0032084 {c |}{res}         0          0          0     61,401          0          0          0          0 {txt}{c |}{res}    61,401 
{txt}  .0032103 {c |}{res}         0          0          0          0          0          0          0          0 {txt}{c |}{res}     2,492 
{txt}  .0053802 {c |}{res}         0     30,854          0          0          0          0          0          0 {txt}{c |}{res}    30,854 
{txt}  .0077781 {c |}{res}    12,728          0          0          0          0          0          0          0 {txt}{c |}{res}    12,728 
{txt}{hline 11}{c +}{hline 88}{c +}{hline 10}
     Total {c |}{res}    12,728     30,854     49,001     61,401     48,041     21,945     10,524      3,569 {txt}{c |}{res}   240,555 


           {txt}{c |} IMF - govt
           {c |} financial
           {c |} openness,
           {c |}    low
    mprop5 {c |}         8 {c |}     Total
{hline 11}{c +}{hline 11}{c +}{hline 10}
  .0005604 {c |}{res}         0 {txt}{c |}{res}     3,569 
{txt}  .0009114 {c |}{res}         0 {txt}{c |}{res}    21,945 
{txt}  .0012353 {c |}{res}         0 {txt}{c |}{res}    10,524 
{txt}  .0022481 {c |}{res}         0 {txt}{c |}{res}    48,041 
{txt}  .0026326 {c |}{res}         0 {txt}{c |}{res}    49,001 
{txt}  .0032084 {c |}{res}         0 {txt}{c |}{res}    61,401 
{txt}  .0032103 {c |}{res}     2,492 {txt}{c |}{res}     2,492 
{txt}  .0053802 {c |}{res}         0 {txt}{c |}{res}    30,854 
{txt}  .0077781 {c |}{res}         0 {txt}{c |}{res}    12,728 
{txt}{hline 11}{c +}{hline 11}{c +}{hline 10}
     Total {c |}{res}     2,492 {txt}{c |}{res}   240,555 


{com}. *bysort capopenl: egen mpr9c = mean(pr9c)

. bysort capopenl: egen mprop9 = mean(deadlyl) if drop==0
{txt}(251 missing values generated)

{com}. tab mprop9 capopenl 

           {txt}{c |}                           IMF - govt financial openness, low
    mprop9 {c |}         0          1          2          3          4          5          6          7 {c |}     Total
{hline 11}{c +}{hline 88}{c +}{hline 10}
         0 {c |}{res}         0          0          0          0          0          0          0      3,569 {txt}{c |}{res}     6,061 
{txt}  .0000911 {c |}{res}         0          0          0          0          0     21,945          0          0 {txt}{c |}{res}    21,945 
{txt}  .0002851 {c |}{res}         0          0          0          0          0          0     10,524          0 {txt}{c |}{res}    10,524 
{txt}  .0004694 {c |}{res}         0          0     49,001          0          0          0          0          0 {txt}{c |}{res}    49,001 
{txt}  .0006661 {c |}{res}         0          0          0          0     48,041          0          0          0 {txt}{c |}{res}    48,041 
{txt}  .0007329 {c |}{res}         0          0          0     61,401          0          0          0          0 {txt}{c |}{res}    61,401 
{txt}  .0010999 {c |}{res}    12,728          0          0          0          0          0          0          0 {txt}{c |}{res}    12,728 
{txt}  .0013612 {c |}{res}         0     30,854          0          0          0          0          0          0 {txt}{c |}{res}    30,854 
{txt}{hline 11}{c +}{hline 88}{c +}{hline 10}
     Total {c |}{res}    12,728     30,854     49,001     61,401     48,041     21,945     10,524      3,569 {txt}{c |}{res}   240,555 


           {txt}{c |} IMF - govt
           {c |} financial
           {c |} openness,
           {c |}    low
    mprop9 {c |}         8 {c |}     Total
{hline 11}{c +}{hline 11}{c +}{hline 10}
         0 {c |}{res}     2,492 {txt}{c |}{res}     6,061 
{txt}  .0000911 {c |}{res}         0 {txt}{c |}{res}    21,945 
{txt}  .0002851 {c |}{res}         0 {txt}{c |}{res}    10,524 
{txt}  .0004694 {c |}{res}         0 {txt}{c |}{res}    49,001 
{txt}  .0006661 {c |}{res}         0 {txt}{c |}{res}    48,041 
{txt}  .0007329 {c |}{res}         0 {txt}{c |}{res}    61,401 
{txt}  .0010999 {c |}{res}         0 {txt}{c |}{res}    12,728 
{txt}  .0013612 {c |}{res}         0 {txt}{c |}{res}    30,854 
{txt}{hline 11}{c +}{hline 11}{c +}{hline 10}
     Total {c |}{res}     2,492 {txt}{c |}{res}   240,555 


{com}. 
. sum mprop5 if capopenl==0

{txt}    Variable {c |}       Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 56}
{space 6}mprop5 {c |}{res}     12728    .0077781           0   .0077781   .0077781

{com}. gen mprop5c0= r(mean)

. 
. sum mprop9 if capopenl==0

{txt}    Variable {c |}       Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 56}
{space 6}mprop9 {c |}{res}     12728    .0010999           0   .0010999   .0010999

{com}. gen mprop9c0= r(mean)

. 
. 
. bysort capopenl: gen firstn=1 if _n==1
{txt}(388400 missing values generated)

{com}. *above line is to simplify computation

. *line mpr5c capopenl if firstn==1

. *line mpr9c capopenl if firstn==1

. sort capopenl

. 
. order capopenl mprop5 mprop9  capB* capse* firstn stateabb* year

. *browse if firstn==1

. 
. *value of XB is -ln((1-p)/p), where p is the estimated probability

. 
. *_n==0 refers to first observation, which is proportion for capopenl==0

. sort capopenl

. gen XB5=-ln((1-mprop5c0)/mprop5c0)+capB5 
{txt}(147795 missing values generated)

{com}. gen XB9=-ln((1-mprop9c0)/mprop9c0)+capB9
{txt}(147795 missing values generated)

{com}. *the capB# adds the coefficient for the relevant capital openness dummy. 

. 
. *gen XB5H=-ln((1-mpr5c)/mpr5c)+1.96*capse5

. *gen XB5L=-ln((1-mpr5c)/mpr5c)-1.96*capse5

. gen XB5H=XB5+1.96*capse5 if firstn==1
{txt}(388401 missing values generated)

{com}. gen XB5L=XB5-1.96*capse5 if firstn==1
{txt}(388401 missing values generated)

{com}. 
. *gen XB9H=-ln((1-mpr9c)/mpr9c)+1.96*capse9

. *gen XB9L=-ln((1-mpr9c)/mpr9c)-1.96*capse9

. gen XB9H=XB9+1.96*capse9 if firstn==1
{txt}(388401 missing values generated)

{com}. gen XB9L=XB9-1.96*capse9 if firstn==1
{txt}(388401 missing values generated)

{com}. 
. *Generating calculated probability (pr5ce means probability from model 5 calculated estimated using changes in capopenl, not that derived from the model).

. gen pr5ce=1/(1+exp(-XB5)) if firstn==1
{txt}(388401 missing values generated)

{com}. gen pr5ch=1/(1+exp(-XB5H)) if firstn==1
{txt}(388401 missing values generated)

{com}. gen pr5cl=1/(1+exp(-XB5L)) if firstn==1
{txt}(388401 missing values generated)

{com}. gen pr9ce=1/(1+exp(-XB9)) if firstn==1
{txt}(388401 missing values generated)

{com}. gen pr9ch=1/(1+exp(-XB9H)) if firstn==1
{txt}(388401 missing values generated)

{com}. gen pr9cl=1/(1+exp(-XB9L)) if firstn==1
{txt}(388401 missing values generated)

{com}. 
. *order capopenl mprop5* mprop9* pr* XB* firstn

. order capopenl mprop5 pr5ce pr5ch pr5cl mprop9 pr9ce pr9ch pr9cl

. *browse if firstn==1

. 
. list capopenl mprop5 mprop9 pr* if firstn==1
{txt}
        {c TLC}{hline 10}{c -}{hline 10}{c -}{hline 10}{c -}{hline 10}{c -}{hline 10}{c -}{hline 10}{c -}{hline 10}{c -}{hline 10}{c -}{hline 10}{c TRC}
        {c |} {res}capopenl     mprop5     mprop9      pr5ce      pr5ch      pr5cl      pr9ce      pr9ch      pr9cl {txt}{c |}
        {c LT}{hline 10}{c -}{hline 10}{c -}{hline 10}{c -}{hline 10}{c -}{hline 10}{c -}{hline 10}{c -}{hline 10}{c -}{hline 10}{c -}{hline 10}{c RT}
     1. {c |} {res}       0   .0077781   .0010999   .0077781   .0133102   .0045348   .0010999    .002021   .0005984 {txt}{c |}
 12730. {c |} {res}       1   .0053802   .0013612   .0066649   .0087033   .0051015   .0011961   .0015908   .0008993 {txt}{c |}
 43587. {c |} {res}       2   .0026326   .0004694   .0057216   .0068252   .0047956   .0012276   .0015502    .000972 {txt}{c |}
 92597. {c |} {res}       3   .0032084   .0007329   .0048336   .0059242    .003943   .0011365    .001511   .0008547 {txt}{c |}
154012. {c |} {res}       4   .0022481   .0006661   .0039468   .0048449   .0032146   .0009074   .0012285   .0006701 {txt}{c |}
        {c LT}{hline 10}{c -}{hline 10}{c -}{hline 10}{c -}{hline 10}{c -}{hline 10}{c -}{hline 10}{c -}{hline 10}{c -}{hline 10}{c -}{hline 10}{c RT}
202066. {c |} {res}       5   .0009114   .0000911   .0030594   .0037501   .0024955   .0005971   .0008865   .0004021 {txt}{c |}
224016. {c |} {res}       6   .0012353   .0002851    .002211   .0031134   .0015697   .0003095   .0006203   .0001544 {txt}{c |}
234547. {c |} {res}       7   .0005604          0    .001463    .002789    .000767   .0001208   .0003981   .0000366 {txt}{c |}
238116. {c |} {res}       8   .0032103          0   .0008705   .0025505   .0002968   .0000339   .0002181   5.28e-06 {txt}{c |}
240616. {c |} {res}       .   .0074173   .0016452          .          .          .          .          .          . {txt}{c |}
        {c BLC}{hline 10}{c -}{hline 10}{c -}{hline 10}{c -}{hline 10}{c -}{hline 10}{c -}{hline 10}{c -}{hline 10}{c -}{hline 10}{c -}{hline 10}{c BRC}

{com}. *browse capopenl mpr5c* mpr9c* if firstn==1

. outsheet capopenl mprop5 pr5ce pr5ch pr5cl mprop9 pr9ce pr9ch pr9cl  if firstn==1 & capopenl~=. using "Output/11-07-14predicted.csv", comma replace
{txt}(note: file Output/11-07-14predicted.csv not found)

{com}. 
. 
. 
. 
. ***Selecting Cases

. *clear

. *cd "/Users/Allan/Dropbox/!!Papers/Liberal Peace/Nina Gartzke paper/2013-20/ReplicationFiles"

. *use "Output/temp"

. 
. gen rule1=.
{txt}(388410 missing values generated)

{com}. order stateabb_a stateabb_b year capopenl capopenl2 capopenh fatalmax cwfatald cwfatal1 cwfatal2

. gsort -cwfatald -capopenl2

. browse if capopenl2~=. & fatalmax~=.  & capopenl2>3

. replace rule1=1 if capopenl2>3 & capopenl2~=. & fatalmax>2 & fatalmax~=.
{txt}(2 real changes made)

{com}. 
. 
. gen rule2=.
{txt}(388410 missing values generated)

{com}. gsort -capopenl2 stateabb_a stateabb_b year

. browse if capopenl2~=. & cwfatald==0 

. replace rule2=1 if capopenl2==8 & capopenl2~=. & cwfatald==0 
{txt}(8 real changes made)

{com}. 
. 
. 
. 
. 
. **Calculating Rule3 (prMID)

. 
. ** The following analyses produce the case selection and tables displayed in the Online Appendix, page 3.

. ** These analyses were performed in 2010, before we were aware of the value of producing high quality replication files. 

. ** These replication files were produced in 2013. 

. ** The following code approximately reproduces, but not exactly, our 2010 analyses reported in the Online Appendix

. ** used to implement Rule 3.

. 
. 
. gen rule3=.
{txt}(388410 missing values generated)

{com}. *Table 1, Model 5:  adding Interests 

. logit maoznewl demlo demhi deplo capopenl rgdppclo gdpcontg sun2cati contig logdstab majpdyds allies lncaprt _spline*, cluster(dyadid) 

{res}{txt}Iteration 0:{space 3}log pseudolikelihood = {res:-3820.7905}  
Iteration 1:{space 3}log pseudolikelihood = {res:-2658.5838}  
Iteration 2:{space 3}log pseudolikelihood = {res:-2232.0639}  
Iteration 3:{space 3}log pseudolikelihood = {res:-2096.4577}  
Iteration 4:{space 3}log pseudolikelihood = {res:-2091.7694}  
Iteration 5:{space 3}log pseudolikelihood = {res:-2091.7516}  
Iteration 6:{space 3}log pseudolikelihood = {res:-2091.7516}  
{res}
{txt}Logistic regression{col 51}Number of obs{col 67}= {res}    166152
{txt}{col 51}Wald chi2({res}15{txt}){col 67}= {res}   1608.69
{txt}{col 51}Prob > chi2{col 67}= {res}    0.0000
{txt}Log pseudolikelihood = {res}-2091.7516{txt}{col 51}Pseudo R2{col 67}= {res}    0.4525

{txt}{ralign 78:(Std. Err. adjusted for {res:9876} clusters in dyadid)}
{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 14}{c |}{col 26}    Robust
{col 1}    maoznewl{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      z{col 46}   P>|z|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 7}demlo {c |}{col 14}{res}{space 2}-.0176354{col 26}{space 2} .0119297{col 37}{space 1}   -1.48{col 46}{space 3}0.139{col 54}{space 4}-.0410171{col 67}{space 3} .0057464
{txt}{space 7}demhi {c |}{col 14}{res}{space 2}-.0027886{col 26}{space 2} .0125191{col 37}{space 1}   -0.22{col 46}{space 3}0.824{col 54}{space 4}-.0273256{col 67}{space 3} .0217484
{txt}{space 7}deplo {c |}{col 14}{res}{space 2}-6.022594{col 26}{space 2} 9.166422{col 37}{space 1}   -0.66{col 46}{space 3}0.511{col 54}{space 4}-23.98845{col 67}{space 3} 11.94326
{txt}{space 4}capopenl {c |}{col 14}{res}{space 2}-.2530444{col 26}{space 2} .0590879{col 37}{space 1}   -4.28{col 46}{space 3}0.000{col 54}{space 4}-.3688546{col 67}{space 3}-.1372343
{txt}{space 4}rgdppclo {c |}{col 14}{res}{space 2} .0002508{col 26}{space 2} .0000328{col 37}{space 1}    7.64{col 46}{space 3}0.000{col 54}{space 4} .0001865{col 67}{space 3} .0003151
{txt}{space 4}gdpcontg {c |}{col 14}{res}{space 2}-.0002756{col 26}{space 2} .0000493{col 37}{space 1}   -5.59{col 46}{space 3}0.000{col 54}{space 4}-.0003723{col 67}{space 3}-.0001789
{txt}{space 4}sun2cati {c |}{col 14}{res}{space 2}-.9647911{col 26}{space 2} .2017769{col 37}{space 1}   -4.78{col 46}{space 3}0.000{col 54}{space 4}-1.360266{col 67}{space 3}-.5693157
{txt}{space 6}contig {c |}{col 14}{res}{space 2} 3.744443{col 26}{space 2} .2724543{col 37}{space 1}   13.74{col 46}{space 3}0.000{col 54}{space 4} 3.210442{col 67}{space 3} 4.278443
{txt}{space 4}logdstab {c |}{col 14}{res}{space 2}-.4184899{col 26}{space 2} .0860347{col 37}{space 1}   -4.86{col 46}{space 3}0.000{col 54}{space 4}-.5871148{col 67}{space 3} -.249865
{txt}{space 4}majpdyds {c |}{col 14}{res}{space 2} 1.423973{col 26}{space 2} .2742048{col 37}{space 1}    5.19{col 46}{space 3}0.000{col 54}{space 4} .8865417{col 67}{space 3} 1.961405
{txt}{space 5}alliesr {c |}{col 14}{res}{space 2}-.0382274{col 26}{space 2}  .234927{col 37}{space 1}   -0.16{col 46}{space 3}0.871{col 54}{space 4}-.4986759{col 67}{space 3}  .422221
{txt}{space 5}lncaprt {c |}{col 14}{res}{space 2}-.1550165{col 26}{space 2} .0563933{col 37}{space 1}   -2.75{col 46}{space 3}0.006{col 54}{space 4}-.2655454{col 67}{space 3}-.0444876
{txt}{space 4}_spline1 {c |}{col 14}{res}{space 2} .0048078{col 26}{space 2} .0005931{col 37}{space 1}    8.11{col 46}{space 3}0.000{col 54}{space 4} .0036453{col 67}{space 3} .0059703
{txt}{space 4}_spline2 {c |}{col 14}{res}{space 2}-.0044574{col 26}{space 2}  .000687{col 37}{space 1}   -6.49{col 46}{space 3}0.000{col 54}{space 4}-.0058038{col 67}{space 3} -.003111
{txt}{space 4}_spline3 {c |}{col 14}{res}{space 2} .0016708{col 26}{space 2} .0003569{col 37}{space 1}    4.68{col 46}{space 3}0.000{col 54}{space 4} .0009712{col 67}{space 3} .0023704
{txt}{space 7}_cons {c |}{col 14}{res}{space 2}-1.043556{col 26}{space 2} .7659373{col 37}{space 1}   -1.36{col 46}{space 3}0.173{col 54}{space 4}-2.544766{col 67}{space 3} .4576531
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}. *demonstrating that we nearly get the same results as Gartzke 2007 when restricting to his dataset, slight difference probably because of 12 additional observations 

. 
. *using Model 5 without temporal controls to avoid selection bias into situations where capital openness is broken

. 
. logit maoznewl demlo demhi deplo capopenl rgdppclo gdpcontg sun2cati contig logdstab majpdyds allies lncaprt namerica samerica europe africa nafmeast asia, cluster(dyadid) 

{res}{txt}Iteration 0:{space 3}log pseudolikelihood = {res:-3820.7905}  
Iteration 1:{space 3}log pseudolikelihood = {res:-2683.3125}  
Iteration 2:{space 3}log pseudolikelihood = {res:-2363.5564}  
Iteration 3:{space 3}log pseudolikelihood = {res:-2295.4613}  
Iteration 4:{space 3}log pseudolikelihood = {res:-2294.5673}  
Iteration 5:{space 3}log pseudolikelihood = {res:-2294.5666}  
Iteration 6:{space 3}log pseudolikelihood = {res:-2294.5666}  
{res}
{txt}Logistic regression{col 51}Number of obs{col 67}= {res}    166152
{txt}{col 51}Wald chi2({res}18{txt}){col 67}= {res}   1417.36
{txt}{col 51}Prob > chi2{col 67}= {res}    0.0000
{txt}Log pseudolikelihood = {res}-2294.5666{txt}{col 51}Pseudo R2{col 67}= {res}    0.3995

{txt}{ralign 78:(Std. Err. adjusted for {res:9876} clusters in dyadid)}
{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 14}{c |}{col 26}    Robust
{col 1}    maoznewl{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      z{col 46}   P>|z|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 7}demlo {c |}{col 14}{res}{space 2}-.0028321{col 26}{space 2} .0143428{col 37}{space 1}   -0.20{col 46}{space 3}0.843{col 54}{space 4}-.0309435{col 67}{space 3} .0252793
{txt}{space 7}demhi {c |}{col 14}{res}{space 2}-.0126199{col 26}{space 2} .0139641{col 37}{space 1}   -0.90{col 46}{space 3}0.366{col 54}{space 4} -.039989{col 67}{space 3} .0147491
{txt}{space 7}deplo {c |}{col 14}{res}{space 2}-11.73627{col 26}{space 2} 9.675179{col 37}{space 1}   -1.21{col 46}{space 3}0.225{col 54}{space 4}-30.69927{col 67}{space 3} 7.226736
{txt}{space 4}capopenl {c |}{col 14}{res}{space 2}-.2005327{col 26}{space 2} .0647855{col 37}{space 1}   -3.10{col 46}{space 3}0.002{col 54}{space 4}-.3275099{col 67}{space 3}-.0735554
{txt}{space 4}rgdppclo {c |}{col 14}{res}{space 2} .0001939{col 26}{space 2} .0000365{col 37}{space 1}    5.31{col 46}{space 3}0.000{col 54}{space 4} .0001223{col 67}{space 3} .0002655
{txt}{space 4}gdpcontg {c |}{col 14}{res}{space 2}-.0002648{col 26}{space 2}   .00007{col 37}{space 1}   -3.78{col 46}{space 3}0.000{col 54}{space 4}-.0004021{col 67}{space 3}-.0001276
{txt}{space 4}sun2cati {c |}{col 14}{res}{space 2}-1.277166{col 26}{space 2} .2495385{col 37}{space 1}   -5.12{col 46}{space 3}0.000{col 54}{space 4}-1.766252{col 67}{space 3}-.7880793
{txt}{space 6}contig {c |}{col 14}{res}{space 2} 3.802759{col 26}{space 2} .3425765{col 37}{space 1}   11.10{col 46}{space 3}0.000{col 54}{space 4} 3.131322{col 67}{space 3} 4.474197
{txt}{space 4}logdstab {c |}{col 14}{res}{space 2} -.578065{col 26}{space 2} .1012796{col 37}{space 1}   -5.71{col 46}{space 3}0.000{col 54}{space 4}-.7765693{col 67}{space 3}-.3795606
{txt}{space 4}majpdyds {c |}{col 14}{res}{space 2} 1.210448{col 26}{space 2} .3472191{col 37}{space 1}    3.49{col 46}{space 3}0.000{col 54}{space 4} .5299107{col 67}{space 3} 1.890984
{txt}{space 5}alliesr {c |}{col 14}{res}{space 2}-.2174383{col 26}{space 2} .3432205{col 37}{space 1}   -0.63{col 46}{space 3}0.526{col 54}{space 4}-.8901381{col 67}{space 3} .4552615
{txt}{space 5}lncaprt {c |}{col 14}{res}{space 2}-.1427276{col 26}{space 2} .0709538{col 37}{space 1}   -2.01{col 46}{space 3}0.044{col 54}{space 4}-.2817945{col 67}{space 3}-.0036607
{txt}{space 4}namerica {c |}{col 14}{res}{space 2} .6263312{col 26}{space 2} .5736467{col 37}{space 1}    1.09{col 46}{space 3}0.275{col 54}{space 4}-.4979956{col 67}{space 3} 1.750658
{txt}{space 4}samerica {c |}{col 14}{res}{space 2} .9824107{col 26}{space 2}  .589468{col 37}{space 1}    1.67{col 46}{space 3}0.096{col 54}{space 4}-.1729253{col 67}{space 3} 2.137747
{txt}{space 6}europe {c |}{col 14}{res}{space 2}-.9549864{col 26}{space 2} .5281897{col 37}{space 1}   -1.81{col 46}{space 3}0.071{col 54}{space 4}-1.990219{col 67}{space 3} .0802463
{txt}{space 6}africa {c |}{col 14}{res}{space 2} .1940131{col 26}{space 2} .4632046{col 37}{space 1}    0.42{col 46}{space 3}0.675{col 54}{space 4}-.7138512{col 67}{space 3} 1.101877
{txt}{space 4}nafmeast {c |}{col 14}{res}{space 2} 1.421053{col 26}{space 2} .3542514{col 37}{space 1}    4.01{col 46}{space 3}0.000{col 54}{space 4} .7267334{col 67}{space 3} 2.115373
{txt}{space 8}asia {c |}{col 14}{res}{space 2} 1.455395{col 26}{space 2}  .421431{col 37}{space 1}    3.45{col 46}{space 3}0.001{col 54}{space 4} .6294059{col 67}{space 3} 2.281385
{txt}{space 7}_cons {c |}{col 14}{res}{space 2}-1.392403{col 26}{space 2} .9073719{col 37}{space 1}   -1.53{col 46}{space 3}0.125{col 54}{space 4}-3.170819{col 67}{space 3} .3860136
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}. predict pr5
{txt}(option pr assumed; Pr(maoznewl))
(222258 missing values generated)

{com}. predict inMID, dx2
{txt}(222258 missing values generated)

{com}. 
. order capopenl pr5

. gsort -pr5 -capopenl

. order inMID pr5 capopenl capopenl2 stateabb_a stateabb_b year

. browse if capopenl==8

. 
. 
. *Table 2, Model 9:  adding Fin.Open.(Low), GDPPC(Low) and GDPPC x Contig. 

. logit deadlyl demlo demhi deplo capopenl rgdppclo gdpcontg contig logdstab majpdyds allies lncaprt namerica samerica europe africa nafmeast asia, cluster(dyadid) 

{res}{txt}Iteration 0:{space 3}log pseudolikelihood = {res:-1071.1723}  
Iteration 1:{space 3}log pseudolikelihood = {res:-794.65021}  
Iteration 2:{space 3}log pseudolikelihood = {res:-729.42863}  
Iteration 3:{space 3}log pseudolikelihood = {res:-720.60746}  
Iteration 4:{space 3}log pseudolikelihood = {res:-720.49475}  
Iteration 5:{space 3}log pseudolikelihood = {res:-720.49469}  
{res}
{txt}Logistic regression{col 51}Number of obs{col 67}= {res}    171522
{txt}{col 51}Wald chi2({res}17{txt}){col 67}= {res}    919.96
{txt}{col 51}Prob > chi2{col 67}= {res}    0.0000
{txt}Log pseudolikelihood = {res}-720.49469{txt}{col 51}Pseudo R2{col 67}= {res}    0.3274

{txt}{ralign 78:(Std. Err. adjusted for {res:10364} clusters in dyadid)}
{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 14}{c |}{col 26}    Robust
{col 1}     deadlyl{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      z{col 46}   P>|z|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 7}demlo {c |}{col 14}{res}{space 2}-.0259306{col 26}{space 2} .0270669{col 37}{space 1}   -0.96{col 46}{space 3}0.338{col 54}{space 4}-.0789808{col 67}{space 3} .0271196
{txt}{space 7}demhi {c |}{col 14}{res}{space 2}  .035619{col 26}{space 2} .0256301{col 37}{space 1}    1.39{col 46}{space 3}0.165{col 54}{space 4}-.0146151{col 67}{space 3}  .085853
{txt}{space 7}deplo {c |}{col 14}{res}{space 2}-123.7168{col 26}{space 2} 90.76815{col 37}{space 1}   -1.36{col 46}{space 3}0.173{col 54}{space 4}-301.6191{col 67}{space 3} 54.18548
{txt}{space 4}capopenl {c |}{col 14}{res}{space 2}-.1424567{col 26}{space 2} .0785851{col 37}{space 1}   -1.81{col 46}{space 3}0.070{col 54}{space 4}-.2964807{col 67}{space 3} .0115673
{txt}{space 4}rgdppclo {c |}{col 14}{res}{space 2} .0001687{col 26}{space 2} .0000518{col 37}{space 1}    3.26{col 46}{space 3}0.001{col 54}{space 4} .0000673{col 67}{space 3} .0002702
{txt}{space 4}gdpcontg {c |}{col 14}{res}{space 2}-.0002313{col 26}{space 2} .0000973{col 37}{space 1}   -2.38{col 46}{space 3}0.017{col 54}{space 4}-.0004221{col 67}{space 3}-.0000406
{txt}{space 6}contig {c |}{col 14}{res}{space 2} 3.442166{col 26}{space 2} .4189988{col 37}{space 1}    8.22{col 46}{space 3}0.000{col 54}{space 4} 2.620943{col 67}{space 3} 4.263388
{txt}{space 4}logdstab {c |}{col 14}{res}{space 2} -.542967{col 26}{space 2} .1225064{col 37}{space 1}   -4.43{col 46}{space 3}0.000{col 54}{space 4}-.7830752{col 67}{space 3}-.3028588
{txt}{space 4}majpdyds {c |}{col 14}{res}{space 2} 1.160774{col 26}{space 2} .5103393{col 37}{space 1}    2.27{col 46}{space 3}0.023{col 54}{space 4} .1605273{col 67}{space 3} 2.161021
{txt}{space 5}alliesr {c |}{col 14}{res}{space 2} -.100362{col 26}{space 2}  .535237{col 37}{space 1}   -0.19{col 46}{space 3}0.851{col 54}{space 4}-1.149407{col 67}{space 3} .9486833
{txt}{space 5}lncaprt {c |}{col 14}{res}{space 2}-.1887648{col 26}{space 2} .0917587{col 37}{space 1}   -2.06{col 46}{space 3}0.040{col 54}{space 4}-.3686086{col 67}{space 3}-.0089211
{txt}{space 4}namerica {c |}{col 14}{res}{space 2} .6578105{col 26}{space 2} .6571442{col 37}{space 1}    1.00{col 46}{space 3}0.317{col 54}{space 4}-.6301684{col 67}{space 3} 1.945789
{txt}{space 4}samerica {c |}{col 14}{res}{space 2} .0234451{col 26}{space 2} 1.104488{col 37}{space 1}    0.02{col 46}{space 3}0.983{col 54}{space 4}-2.141311{col 67}{space 3} 2.188201
{txt}{space 6}europe {c |}{col 14}{res}{space 2}-1.546055{col 26}{space 2} 1.093185{col 37}{space 1}   -1.41{col 46}{space 3}0.157{col 54}{space 4}-3.688659{col 67}{space 3} .5965488
{txt}{space 6}africa {c |}{col 14}{res}{space 2} .7121609{col 26}{space 2} .6008193{col 37}{space 1}    1.19{col 46}{space 3}0.236{col 54}{space 4}-.4654233{col 67}{space 3} 1.889745
{txt}{space 4}nafmeast {c |}{col 14}{res}{space 2} 1.833385{col 26}{space 2} .4006571{col 37}{space 1}    4.58{col 46}{space 3}0.000{col 54}{space 4} 1.048111{col 67}{space 3} 2.618658
{txt}{space 8}asia {c |}{col 14}{res}{space 2} 1.594178{col 26}{space 2} .5797655{col 37}{space 1}    2.75{col 46}{space 3}0.006{col 54}{space 4} .4578585{col 67}{space 3} 2.730498
{txt}{space 7}_cons {c |}{col 14}{res}{space 2}-4.298574{col 26}{space 2} 1.149241{col 37}{space 1}   -3.74{col 46}{space 3}0.000{col 54}{space 4}-6.551046{col 67}{space 3}-2.046103
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{p 0 6 2}Note: 24 failures and 0 successes completely determined.{p_end}

{com}. predict pr9
{txt}(option pr assumed; Pr(deadlyl))
(216888 missing values generated)

{com}. predict infMID, dx2
{txt}(216888 missing values generated)

{com}. 
. order capopenl pr9

. sort capopenl pr9

. sort pr9

. order pr9 capopenl stateabb_a stateabb_b year

. *browse if pr9~=. & capopenl>5

. 
. logit deadlyl demlo demhi deplo capopenl rgdppclo gdpcontg contig logdstab majpdyds allies lncaprt, cluster(dyadid) 

{res}{txt}Iteration 0:{space 3}log pseudolikelihood = {res:-1071.1723}  
Iteration 1:{space 3}log pseudolikelihood = {res:-826.20342}  
Iteration 2:{space 3}log pseudolikelihood = {res:-763.30051}  
Iteration 3:{space 3}log pseudolikelihood = {res:-747.45959}  
Iteration 4:{space 3}log pseudolikelihood = {res:-747.27944}  
Iteration 5:{space 3}log pseudolikelihood = {res:-747.27902}  
Iteration 6:{space 3}log pseudolikelihood = {res:-747.27902}  
{res}
{txt}Logistic regression{col 51}Number of obs{col 67}= {res}    171522
{txt}{col 51}Wald chi2({res}11{txt}){col 67}= {res}    539.76
{txt}{col 51}Prob > chi2{col 67}= {res}    0.0000
{txt}Log pseudolikelihood = {res}-747.27902{txt}{col 51}Pseudo R2{col 67}= {res}    0.3024

{txt}{ralign 78:(Std. Err. adjusted for {res:10364} clusters in dyadid)}
{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 14}{c |}{col 26}    Robust
{col 1}     deadlyl{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      z{col 46}   P>|z|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 7}demlo {c |}{col 14}{res}{space 2} -.059371{col 26}{space 2} .0293553{col 37}{space 1}   -2.02{col 46}{space 3}0.043{col 54}{space 4}-.1169063{col 67}{space 3}-.0018356
{txt}{space 7}demhi {c |}{col 14}{res}{space 2} .0227981{col 26}{space 2} .0251555{col 37}{space 1}    0.91{col 46}{space 3}0.365{col 54}{space 4}-.0265056{col 67}{space 3} .0721019
{txt}{space 7}deplo {c |}{col 14}{res}{space 2}-204.1843{col 26}{space 2} 126.1867{col 37}{space 1}   -1.62{col 46}{space 3}0.106{col 54}{space 4}-451.5058{col 67}{space 3} 43.13716
{txt}{space 4}capopenl {c |}{col 14}{res}{space 2}-.1909598{col 26}{space 2} .0777007{col 37}{space 1}   -2.46{col 46}{space 3}0.014{col 54}{space 4}-.3432505{col 67}{space 3}-.0386691
{txt}{space 4}rgdppclo {c |}{col 14}{res}{space 2} .0001957{col 26}{space 2}  .000055{col 37}{space 1}    3.56{col 46}{space 3}0.000{col 54}{space 4}  .000088{col 67}{space 3} .0003035
{txt}{space 4}gdpcontg {c |}{col 14}{res}{space 2}-.0001925{col 26}{space 2} .0001204{col 37}{space 1}   -1.60{col 46}{space 3}0.110{col 54}{space 4}-.0004285{col 67}{space 3} .0000434
{txt}{space 6}contig {c |}{col 14}{res}{space 2}  3.97076{col 26}{space 2} .5370525{col 37}{space 1}    7.39{col 46}{space 3}0.000{col 54}{space 4} 2.918157{col 67}{space 3} 5.023364
{txt}{space 4}logdstab {c |}{col 14}{res}{space 2}-.6230675{col 26}{space 2} .1264678{col 37}{space 1}   -4.93{col 46}{space 3}0.000{col 54}{space 4}-.8709398{col 67}{space 3}-.3751952
{txt}{space 4}majpdyds {c |}{col 14}{res}{space 2} .9064987{col 26}{space 2} .4657632{col 37}{space 1}    1.95{col 46}{space 3}0.052{col 54}{space 4}-.0063804{col 67}{space 3} 1.819378
{txt}{space 5}alliesr {c |}{col 14}{res}{space 2}-.4002123{col 26}{space 2} .4022157{col 37}{space 1}   -1.00{col 46}{space 3}0.320{col 54}{space 4}-1.188541{col 67}{space 3} .3881161
{txt}{space 5}lncaprt {c |}{col 14}{res}{space 2} -.214762{col 26}{space 2} .0957507{col 37}{space 1}   -2.24{col 46}{space 3}0.025{col 54}{space 4}-.4024298{col 67}{space 3}-.0270942
{txt}{space 7}_cons {c |}{col 14}{res}{space 2}-3.327607{col 26}{space 2} 1.123278{col 37}{space 1}   -2.96{col 46}{space 3}0.003{col 54}{space 4}-5.529191{col 67}{space 3}-1.126023
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{p 0 6 2}Note: 55 failures and 0 successes completely determined.{p_end}

{com}. predict pr92
{txt}(option pr assumed; Pr(deadlyl))
(216888 missing values generated)

{com}. 
. order capopenl pr92

. sort capopenl pr92

. sort pr92

. *browse if pr92~=. & capopenl>5

. 
. *Table 2, Model 7:  adding Fin.Open.(Low), GDPPC(Low) and GDPPC x Contig. 

. logit warl demlo demhi deplo capopenl rgdppclo gdpcontg contig logdstab majpdyds allies lncaprt namerica samerica europe africa nafmeast asia, cluster(dyadid) 

{txt}note: samerica != 0 predicts failure perfectly
      samerica dropped and 1435 obs not used

note: europe != 0 predicts failure perfectly
      europe dropped and 4881 obs not used

{res}{txt}Iteration 0:{space 3}log pseudolikelihood = {res:-389.64037}  
Iteration 1:{space 3}log pseudolikelihood = {res:-268.77006}  
Iteration 2:{space 3}log pseudolikelihood = {res:-222.23245}  
Iteration 3:{space 3}log pseudolikelihood = {res:-196.87449}  
Iteration 4:{space 3}log pseudolikelihood = {res:-196.04262}  
Iteration 5:{space 3}log pseudolikelihood = {res:-196.02486}  
Iteration 6:{space 3}log pseudolikelihood = {res:-196.02484}  
{res}
{txt}Logistic regression{col 51}Number of obs{col 67}= {res}    165206
{txt}{col 51}Wald chi2({res}15{txt}){col 67}= {res}    326.00
{txt}{col 51}Prob > chi2{col 67}= {res}    0.0000
{txt}Log pseudolikelihood = {res}-196.02484{txt}{col 51}Pseudo R2{col 67}= {res}    0.4969

{txt}{ralign 78:(Std. Err. adjusted for {res:9784} clusters in dyadid)}
{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 14}{c |}{col 26}    Robust
{col 1}        warl{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      z{col 46}   P>|z|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 7}demlo {c |}{col 14}{res}{space 2} .0009497{col 26}{space 2} .0653996{col 37}{space 1}    0.01{col 46}{space 3}0.988{col 54}{space 4}-.1272312{col 67}{space 3} .1291307
{txt}{space 7}demhi {c |}{col 14}{res}{space 2}-.0007351{col 26}{space 2} .0556487{col 37}{space 1}   -0.01{col 46}{space 3}0.989{col 54}{space 4}-.1098045{col 67}{space 3} .1083342
{txt}{space 7}deplo {c |}{col 14}{res}{space 2}-144.4752{col 26}{space 2} 232.0806{col 37}{space 1}   -0.62{col 46}{space 3}0.534{col 54}{space 4}-599.3449{col 67}{space 3} 310.3944
{txt}{space 4}capopenl {c |}{col 14}{res}{space 2}-.4067222{col 26}{space 2} .1685975{col 37}{space 1}   -2.41{col 46}{space 3}0.016{col 54}{space 4}-.7371672{col 67}{space 3}-.0762772
{txt}{space 4}rgdppclo {c |}{col 14}{res}{space 2} .0002587{col 26}{space 2} .0000795{col 37}{space 1}    3.26{col 46}{space 3}0.001{col 54}{space 4}  .000103{col 67}{space 3} .0004145
{txt}{space 4}gdpcontg {c |}{col 14}{res}{space 2}-.0004832{col 26}{space 2} .0002252{col 37}{space 1}   -2.15{col 46}{space 3}0.032{col 54}{space 4}-.0009247{col 67}{space 3}-.0000417
{txt}{space 6}contig {c |}{col 14}{res}{space 2} 4.693968{col 26}{space 2} .7883263{col 37}{space 1}    5.95{col 46}{space 3}0.000{col 54}{space 4} 3.148876{col 67}{space 3} 6.239059
{txt}{space 4}logdstab {c |}{col 14}{res}{space 2}-.6060891{col 26}{space 2} .1925026{col 37}{space 1}   -3.15{col 46}{space 3}0.002{col 54}{space 4}-.9833872{col 67}{space 3}-.2287909
{txt}{space 4}majpdyds {c |}{col 14}{res}{space 2} 1.374565{col 26}{space 2}  1.31662{col 37}{space 1}    1.04{col 46}{space 3}0.296{col 54}{space 4}-1.205962{col 67}{space 3} 3.955092
{txt}{space 5}alliesr {c |}{col 14}{res}{space 2}-1.772387{col 26}{space 2} .7022038{col 37}{space 1}   -2.52{col 46}{space 3}0.012{col 54}{space 4}-3.148681{col 67}{space 3}-.3960926
{txt}{space 5}lncaprt {c |}{col 14}{res}{space 2}-.8488082{col 26}{space 2} .2665035{col 37}{space 1}   -3.18{col 46}{space 3}0.001{col 54}{space 4}-1.371145{col 67}{space 3}-.3264709
{txt}{space 4}namerica {c |}{col 14}{res}{space 2} .9172468{col 26}{space 2} 1.201024{col 37}{space 1}    0.76{col 46}{space 3}0.445{col 54}{space 4}-1.436717{col 67}{space 3} 3.271211
{txt}{space 4}samerica {c |}{col 14}{res}{space 2}        0{col 26}{txt}  (omitted)
{space 6}europe {c |}{col 14}{res}{space 2}        0{col 26}{txt}  (omitted)
{space 6}africa {c |}{col 14}{res}{space 2} .6056148{col 26}{space 2} .9700803{col 37}{space 1}    0.62{col 46}{space 3}0.532{col 54}{space 4}-1.295708{col 67}{space 3} 2.506937
{txt}{space 4}nafmeast {c |}{col 14}{res}{space 2} 2.571556{col 26}{space 2} .6192262{col 37}{space 1}    4.15{col 46}{space 3}0.000{col 54}{space 4} 1.357895{col 67}{space 3} 3.785217
{txt}{space 8}asia {c |}{col 14}{res}{space 2}-.2576609{col 26}{space 2} 1.085191{col 37}{space 1}   -0.24{col 46}{space 3}0.812{col 54}{space 4}-2.384596{col 67}{space 3} 1.869274
{txt}{space 7}_cons {c |}{col 14}{res}{space 2}-4.110849{col 26}{space 2} 1.915669{col 37}{space 1}   -2.15{col 46}{space 3}0.032{col 54}{space 4}-7.865491{col 67}{space 3}-.3562079
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{p 0 6 2}Note: 21 failures and 0 successes completely determined.{p_end}

{com}. predict pr7
{txt}(option pr assumed; Pr(warl))
(223204 missing values generated)

{com}. predict inWAR, dx2
{txt}(223204 missing values generated)

{com}. 
. order pr7

. sort  pr7

. *browse if pr7~=. & capopenl>6

. order pr5 pr9 pr7

. gsort -pr5

. gsort fatalmax -pr5

. gen rankM=.
{txt}(388410 missing values generated)

{com}. by fatalmax: replace rankM=_n if fatalmax==.
{txt}(385607 real changes made)

{com}. order fatalmax rankM

. 
. gsort fatalmax -pr9

. gen rankF=.
{txt}(388410 missing values generated)

{com}. by fatalmax: replace rankF=_n if fatalmax==.
{txt}(385607 real changes made)

{com}. order fatalmax rankM rankF

. 
. gen rankC=rankM+rankF
{txt}(2803 missing values generated)

{com}. gsort rankC -capopenl2

. order fatalmax rankM rankF rankC capopenl2 stateabb* year inWAR infMID inMID

. 
. replace rule3=1 if rankC<5100 & capopenl2==8 & statename_b~="Haiti" 
{txt}(14 real changes made)

{com}. 
. *selection rule is for those two dyads that are prevelant in the top 20 dyad-years selected by low rank for given capopenl2 level 

. replace rule3=1 if rankC<4300 & capopenl2==7 & statename_b~="Mexico" & statename_a~="Kuwait" & statename_b~="Yemen Arab Republic" & statename_b~="Nicaragua"
{txt}(15 real changes made)

{com}. 
. *browse if capopenl2==6

. gen priority=1 if rule1==1 
{txt}(388408 missing values generated)

{com}. replace priority=2 if rule2==1
{txt}(8 real changes made)

{com}. replace priority=3 if rule3==1
{txt}(29 real changes made)

{com}. sort priority

. 
. order rule1 rule2 rule3 stateabb_a stateabb_b year fatalmax capopenl2 capopenh rankC rankM rankF pr5 pr7 pr9

. keep rule1 rule2 rule3 stateabb_a stateabb_b year fatalmax capopenl2 capopenh rankC rankM rankF pr5 pr7 pr9

. 
. outsheet using "Output/10.07.21 cases.csv" if rule1==1 | rule2==1 | rule3==1, comma replace
{txt}(note: file Output/10.07.21 cases.csv not found)

{com}. 
. log close
      {txt}name:  {res}<unnamed>
       {txt}log:  {res}/Users/Allan/Dropbox/!!Papers/Liberal Peace/Nina Gartzke paper/2013-20/ReplicationFiles/Output/log_observing_do.smcl
  {txt}log type:  {res}smcl
 {txt}closed on:  {res}10 Feb 2014, 10:35:51
{txt}{.-}
{smcl}
{txt}{sf}{ul off}